package com.matrix.java.chap_03;

import sun.print.SunMinMaxPage;

import java.util.Scanner;

/*
    回文数字
 */
public class Ex3_12 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter a three-digit integer: ");
        int num = input.nextInt();

        int num1 = num % 10;
        int num2 = num / 10 % 10;
        int num3 = num / 100 % 10;
        int sum = num1 * 100 + num2 * 10 + num3;
        if (sum == num) {
            System.out.println(true);
            return;
        }
        System.out.println(false);
        input.close();
    }
}
